// Input.h

#ifndef _INPUT_h
#define _INPUT_h

#if defined(ARDUINO) && ARDUINO >= 100
	#include "Arduino.h"
#else
	#include "WProgram.h"
#endif
#include "StarburstCommon.h"

#define BUTTON_1_PIN      4
#define BUTTON_2_PIN      A4
#define R_PIN             6
#define G_PIN             5
#define B_PIN             3
#define H_ENCODER_1_PIN   7
#define H_ENCODER_2_PIN   8
#define S_ENCODER_1_PIN   A3
#define S_ENCODER_2_PIN   A2

extern uint8_t hue, saturation, value;

void initInputs();
void updateKnobs(RGB rgb);
void updateKnobs();
bool update(Mode & m);
int readEncoded(int value, int pin1, int pin2, int & prevEncoded, int delta);


#endif

